home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / CAD / PKEY11_1.ARJ / DL.LSP < prev    next >
Text File  |  1992-03-14  |  593b  |  20 lines

  1. ;Multiple delete layers based on selection (BE VERY VERY CAREFULL)
  2. ;Any mishaps can be undone. Merely type U at the command line and
  3. ;press return.
  4. ;
  5. ;                     ********Patrick J. McKee, author********
  6. ;                       ****Copyright 1992, Power Key tm****
  7. ;
  8. (defun C:dl ()
  9. (setq ss (ssget))
  10. (setq counter 0)
  11. (prompt "Deleting layers...")
  12. (while
  13.   (setq e (ssname ss counter))
  14.   (setq l (cdr (assoc 8 (entget e))))
  15.   (setq S (ssget "X" (list (cons 8 l))))
  16. (progn
  17.   (command "erase" s ""))
  18.   (setq counter (+ counter 1))
  19.   (princ l)(princ ", ") 
  20.   (princ)))